package com.TPNexus.model;

import java.io.Serializable;

import javax.enterprise.context.ConversationScoped;
import javax.enterprise.context.SessionScoped;
import javax.inject.Named;

@Named
@SessionScoped
public class Product implements Serializable  {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private long productId;
	private String name;
	private String description;
	private boolean status;
	
	

	public long getId() {
		return productId;
	}

	public void setId(long id) {
		this.productId = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public boolean isStatus() {
		return status;
	}

	public void setStatus(boolean status) {
		this.status = status;
	}

	public Product(long id, String name, String description, boolean status) {
		super();
		this.productId = id;
		this.name = name;
		this.description = description;
		this.status = status;
	}

	public Product() {

	}
	 @Override
     public boolean equals(Object obj) {
        
         if(obj == null) {
             return false;
         }
        
         if(!(obj instanceof Product)) {
             return false;
         }
        
         Product c = (Product)obj;
         if(c.getId()==this.productId) {
             return true;
         }
        
         return false;    
     }

	 
}
